﻿using KWT.DRG_DIP.DO.Group;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace KWT.DRG_DIP.DTO.Group
{
    /// <summary>
    /// 分组器入参
    /// 包含所有分组器的参数
    /// </summary>
    public class InGroupPara
    {
        /// <summary>
        /// 医保类型 1职工2居民 ,必填
        /// </summary>
        public int insuedType { get; set; }

        /// <summary>
        /// 截止当前金额合计 ,必填
        /// </summary>
        public Decimal totalCost { get; set; }

        /// <summary>
        /// 诊断组
        /// </summary>
        public List<Diagnose> diagnoses { get; set; } = new List<Diagnose>();
        /// <summary>
        ///  手术组
        /// </summary>
        public List<Operation> operation { get; set; } = new List<Operation>();

        /// <summary>
        /// 分组器版本
        /// </summary>
        public string version { get; set; } = "1";

        #region DIP 参数
        /// <summary>
        /// 主诊断编码
        /// </summary>
        public string MainDiagnoseCode { get; set; } = "";
        /// <summary>
        /// 主诊断亚目： A09.1
        /// </summary>
        public string Suborder
        {
            get
            {
                return MainDiagnoseCode?.Length > 5 ? MainDiagnoseCode.Substring(0, 5) : "";
            }
            set;
        } = "";

        /// <summary>
        /// 主诊断类目：A09
        /// </summary>
        public string Category
        {
            get
            {
                return MainDiagnoseCode?.Length > 3 ? MainDiagnoseCode.Substring(0, 3) : "";
            }
            set;
        } = "";

        /// <summary>
        /// 主诊断首字母：A
        /// </summary>
        public string InitialLetter
        {
            get
            {
                return MainDiagnoseCode?.Length > 1 ? MainDiagnoseCode.Substring(0, 1) : "";
            }
            set;
        } = "";


        /// <summary>
        ///  离院方式：-1:其他   1:死亡;
        /// </summary>
        public int LeaveType { get; set; } = -1;

        /// <summary>
        /// 住院天数
        /// </summary>
        public int Days { get; set; } = 0;

        #endregion

        #region DRG参数
        /// <summary>
        /// 年龄 岁,必填
        /// </summary>
        public int age { get; set; }

        /// <summary>
        /// 0 天；1 岁 ,必填
        /// </summary>
        public int ageUnit { get; set; }

        /// <summary>
        /// 出生体重，单位:克
        /// </summary>
        public int bornWeight { get; set; }

        /// <summary>
        /// 性别1男2女 ,必填
        /// </summary>
        public int sexCode { get; set; }
        #endregion
    }
}
